package com.cy.pj.sys.web.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class JsonResult {
    private Integer status = 1;

    private String massage = "200 ok";

    private Object data;

    public JsonResult(Integer status){
        this.status=status;
    }

    public JsonResult(Integer status,String massage){
        this(massage);
        this.status = status;
    }

    public JsonResult(String massage){
        this.massage = massage;
    }

    public JsonResult(Object data){
        this.data = data;
    }

    public JsonResult(Throwable exception){
        this(0,exception.getMessage());
    }
}
